package com.qf.demo;

import com.qf.config.SpringConfig;
import org.apache.commons.dbutils.QueryRunner;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Description: 公用常量
 * @Data: 2022/8/30 17:36
 * @Pacakge: com.qf.demo
 * @ClassName: Demo02
 * @Author: fan
 */
public class Demo02 {
    public static void main(String[] args) {
        ApplicationContext applicationContext
                = new AnnotationConfigApplicationContext(SpringConfig.class);
        QueryRunner queryRunner = (QueryRunner) applicationContext.getBean("queryRunner");
        QueryRunner queryRunner1 = (QueryRunner) applicationContext.getBean("queryRunner");
        System.out.println(queryRunner==queryRunner1);
    }
}
